#ifndef TIMER_H
#define TIMER_H

#include <chrono>

class Timer
{
public:
    void tic() { m_start = std::chrono::high_resolution_clock::now(); }

    double toc() const 
    { 
        return std::chrono::duration<double>(
            std::chrono::high_resolution_clock::now() - m_start
        ).count();
    }

private:
    std::chrono::high_resolution_clock::time_point m_start;
};

#endif